package com.educal.Until;

import java.io.File;
import java.io.FileOutputStream;

/**
 * Created by lenovo on 2017/11/21.
 */
public class FileUtil {
    public static void uploadFile(byte[] file, String filePath, String fileName) throws Exception {

        File targetFile = new File(filePath);
        if(!targetFile.exists()){
            targetFile.mkdirs();
        }
        FileOutputStream out = new FileOutputStream(filePath+fileName);
        out.write(file);
       // out.flush();
        out.close();
    }
}
